package top.noteday.provider.form;

import java.util.List;
import java.util.Date;
import entity.Page;
import entity.result.EntityResult;
import entity.result.PageResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import entity.form.*;

// TODO 修改 path
@FeignClient(value = "kalimdor-apiImpl", path = "/backstage/form", contextId="formService")
public interface FormService {

    /**
     * 查询一个
     */
    @PostMapping(value = "/selectById")
    Form selectById(@RequestParam("id") Integer id);

    /**
     * 保存表单模板
     */
    @PostMapping(value = "/saveFormTemplate")
    EntityResult<FormDto> saveFormTemplate(@RequestBody FormVo vo);

    /**
     * 获取表单模板
     */
    @PostMapping(value = "/getFormTemplate")
    EntityResult<FormDto> getFormTemplate(@RequestBody FormVo vo);

    /**
     * 提交表单
     */
    @PostMapping(value = "/submitForm")
    EntityResult<FormDto> submitForm(@RequestBody FormVo vo);

    /**
     * 分页查询
     */
    /*
    @PostMapping(value = "/selectForm")
    PageResult<FormDto> selectForm(@RequestBody FormVo formVo);
    */
}
